home *** CD-ROM | disk | FTP | other *** search
- Path: iway.fr!usenet
- From: Pascal Terracol <assetsto@pratique.fr>
- Newsgroups: comp.lang.c
- Subject: Pointer arithmetic
- Date: 29 Feb 1996 00:14:28 GMT
- Organization: AssetsToMediA
- Message-ID: <4h2r55$er@s3.iway.fr>
- NNTP-Posting-Host: ts7-p24.dialup.iway.fr
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Macintosh; I; 68K)
- X-URL: news:comp.lang.c/168868-168967
-
- Hello,
-
- this sample code have been correctly working on a pc 80286 processor
-
- I put it on a mac and the pointers seems to act differently...
- any idea about that ?
-
-
- int size, n1, n2 ;
- Point *p_debut, *p1, *p2 ; /* "vecteur" de translation des adr */
-
- ...
-
- n1 = (int) (l->p1)/sizeof(Point) ;
- n2 = (int) (l->p2)/sizeof(Point) ;
-
- p1 = p_debut + n1 ;
- p2 = p_debut + n1 ;
- ...
-
- is there a cast solution ?
- this is the "Point" structure
-
- typedef struct { float x, y, z ; /* coordonnes point 3d */
- float tx, ty, tz ; /* coord. transformee 3d */
- float px, py, pz ; /* coord. pixels fenetre2d */
- int ix, iy ; /* coord. pixels 2d ecran */
- int compute ; /* point calcule ? 1 oui */
- } Point ;
-
-
- Bonjour de Paris,
-
- Pascal
-
-
-